<?php $this->beginBlock('isLogin')?>
<!--页面右侧-->
<div class="navbar-header pull-right manual-menu">
    <ul class="nav navbar-nav navbar-right">
        <li class="dropdown">
            <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
                <?=!Yii::$app->user->isGuest ? Yii::$app->user->identity->username :'个人中心'?> <span class="caret"></span>
            </a>
            <ul class="dropdown-menu">
                <li><a href="#">基本资料</a> </li>
                <li><a href="<?=\yii\helpers\Url::toRoute(['ucenter/index'])?>" target="_blank">我的文档</a> </li>
                <?php if (!Yii::$app->user->isGuest):?>
                    <li class="divider"></li>
                    <li><a href="<?=\yii\helpers\Url::toRoute(['ucenter/logout'])?>"> 退出登录</a></li>
                <?php endif;?>
            </ul>
        </li>
    </ul>
</div>
<?php $this->endBlock()?>

<?php $this->beginBlock('pageTitle')?>
<a href="/" title="FankersDoc" class="book-title">
    FankersDoc
</a>
<?php $this->endBlock()?>

<div class="container" style="margin-top: 70px">
    <div class="row">
        <?php if (isset($projects['items']) && !empty($projects['items'])):?>
            <?foreach ($projects['items'] as $project):?>
            <div class="col-sm-3">
            <div class="thumbnail">
                <img src="" alt="">
                <div class="caption">
                    <h3><?=isset($project['name']) ? $project['name'] : ''?></h3>
                    <p style="margin: 10px 0"><?=isset($project['desc']) ? $project['desc'] : ''?></p>
                    <p>
                        <a href="<?=\yii\helpers\Url::toRoute(['docs/index','projectId' => $project['id']])?>" class="btn btn-primary btn-xs" role="button">详情</a>
                        <a tabindex="0" class="btn btn-xs btn-warning" role="button" data-toggle="popover" data-html="true" data-trigger="focus" data-container="body" title="项目属性" data-content="<?=$project['tips']?>">属性</a>
                    </p>
                </div>
            </div>
        </div>
            <?php endforeach;?>
        <?php endif;?>
    </div>
</div>

<?php $this->beginBlock("jsFooterText")?>
<script>
    $(function () {
        $('[data-toggle="popover"]').popover()
    })
</script>

<?php $this->endBlock()?>